package com.chen.spring.cloud.service.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chen.entity.User;
import com.chen.spring.cloud.service.admin.mapper.ZsUserMapper;
import com.chen.spring.cloud.service.admin.service.IZsUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author 陈永鹏
 * @since 2019-03-25
 */
@Service
public class ZsUserServiceImpl extends ServiceImpl<ZsUserMapper, User> implements IZsUserService {

    @Autowired
    private ZsUserMapper zsUserMapper;

    @Override
    public User getUidByOpenid(String wx_openid) {
        return zsUserMapper.selectOne(new QueryWrapper<User>().eq("wx_openid",wx_openid));
    }
}
